﻿<Window x:Class="LogReader.MainWindow"        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="{Binding DisplayFileName}" Height="550" Width="725">   
    <Grid>
        <DockPanel>
            <Menu IsMainMenu="True"  DockPanel.Dock="Top" >
                <MenuItem Header="_File" >                    
                    <MenuItem Header="_Open" Command="{Binding OpenCommand}">
                        <MenuItem.Icon>
                            <Image Source="Images/open.png" />
                        </MenuItem.Icon>
                    </MenuItem>                          
                </MenuItem>                           
            </Menu>

            <StackPanel Orientation="Horizontal" DockPanel.Dock="Top" FocusManager.FocusedElement="{Binding ElementName=txtFind}">
                <TextBox  x:Name="txtFind" Width="100" Margin="5"  IsEnabled="{Binding IsFindEnabled}" Text="{Binding Path=FindText, UpdateSourceTrigger=PropertyChanged}" />
                <Button Content="Filter" Command="{Binding Path=GetResultsCommand}" IsEnabled="{Binding IsFindEnabled}"  Width="59" Margin="5" IsDefault="True" />
        </StackPanel>
            <StatusBar DockPanel.Dock="Bottom">
                <StatusBar.ItemsPanel>
                    <ItemsPanelTemplate>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                        </Grid>
                    </ItemsPanelTemplate>
                </StatusBar.ItemsPanel>
                <StatusBarItem Grid.Column="0">
                    <TextBlock Name="lblStatus" Text="{Binding Path=StatusMessage}" />
                </StatusBarItem>
                <StatusBarItem Grid.Column="2">
                    <TextBlock>                             
                    <Hyperlink Name="lnkCodeplex" NavigateUri="http://logreader.codeplex.com">
                        http://logreader.codeplex.com
                    </Hyperlink>
                        Developer: Erik Karimov
                    </TextBlock>
                </StatusBarItem>
            </StatusBar>
            <TextBox TextWrapping="NoWrap" Text="{Binding Path=ResultString}" IsReadOnlyCaretVisible="True" IsReadOnly="True" Margin="3" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" FontSize="14" TextChanged="TextBox_TextChanged" />
        </DockPanel>
    </Grid>
</Window>
